#{extends 'template/main.html' /}
#{set title:'Inserir' /}

<fieldset>
<legend><span class="glyphicon glyphicon-plus"></span> Adicionar Paciente</legend>

<div class="panel panel-success">
  <div class="panel-heading">
  	<h4><span class="glyphicon glyphicon-list-alt"></span> Dados</h4>
  </div>
  <div class="panel-body">
<form class="form-horizontal" role="form" action="@{Pacientes.salvar()}">

  <div class="form-group " >
    <label for="inputNome1" class="col-lg-2 control-label">Nome</label>
    <div class="col-lg-5">
      <input type="text" class="form-control" id="inputError" placeholder="Nome" name="paciente.nome" value="${flash['paciente.nome']}">      
    </div>
    <span class="label label-danger">#{error 'paciente.nome' /}</span>
  </div>
  <div class="form-group">
    <label for="inputCpf1" class="col-lg-2 control-label">CPF</label>
    <div class="col-lg-5">
      <input type="text" class="form-control" id="inputCpf1" placeholder="CPF" name="paciente.cpf" value="${flash['paciente.cpf']}">
   </div>
   <span class="label label-danger">#{error 'paciente.cpf' /}</span>  
  </div>
  <div class="form-group">
    <label for="inputTelefone1" class="col-lg-2 control-label">Telefone</label>
    <div class="col-lg-5">
      <input type="text" class="form-control" id="inputTelefone1" placeholder="Telefone" name="paciente.telefone" value="${flash['paciente.telefone']}">
   </div>
   <span class="label label-danger">#{error 'paciente.telefone' /}</span>    
  </div>
  <div class="form-group">
    <label for="inputCelular1" class="col-lg-2 control-label">Celular</label>
    <div class="col-lg-5">
      <input type="text" class="form-control" id="inputCelular1" placeholder="Celular" name="paciente.celular" value="${flash['paciente.celular']}">
   </div>
   <span class="label label-danger">#{error 'paciente.celular' /}</span>    
  </div>
  <div class="form-group">
    <label for="inputEmail1" class="col-lg-2 control-label">Email</label>
    <div class="col-lg-5">
      <input type="email" class="form-control" id="inputEmail1" placeholder="Email" name="paciente.email" value="${flash['paciente.email']}">
   </div>
   <span class="label label-danger">#{error 'paciente.email' /}</span>   
  </div>
  <div class="form-group">
    <label for="inputEndereco1" class="col-lg-2 control-label">Endereço</label>
    <div class="col-lg-5">
      <input type="text" class="form-control" id="inputEndereco1" placeholder="Endereço" name="paciente.endereco" value="${flash['paciente.endereco']}">
   </div> 
   <span class="label label-danger">#{error 'paciente.endereco' /}</span>  
  </div>
  <div class="form-group">
    <label for="inputBairro1" class="col-lg-2 control-label">Bairro</label>
    <div class="col-lg-5">
      <input type="text" class="form-control" id="inputBairro1" placeholder="Bairro" name="paciente.bairro" value="${flash['paciente.bairro']}">
   </div>  
   <span class="label label-danger">#{error 'paciente.bairro' /}</span> 
  </div>
  <div class="form-group">
    <label for="inputCidade1" class="col-lg-2 control-label">Cidade</label>
    <div class="col-lg-5">
      <input type="text" class="form-control" id="inputCidade1" placeholder="Cidade" name="paciente.cidade" value="${flash['paciente.cidade']}">
   </div>  
   <span class="label label-danger">#{error 'paciente.cidade' /}</span> 
  </div><br/>
  <div class="form-group">
    <div class="col-lg-offset-2 col-lg-10">
      <a href="@{Nutricionistas.index()}" class="btn btn-default"><span class="glyphicon glyphicon-remove"></span> Cancelar</a>
      <button type="submit" class="btn btn-success"><span class="glyphicon glyphicon-floppy-disk"></span> Salvar</button>
    </div>
  </div>
  <br/>
  </form>
  </div>
  </div>
 </fieldset>
